<div class="container">
   <h3>我的购物车</h3> 	
	<div class="well well-sm">		
		<span class="badge badge-inverse">{{itemsOnCart}}</span> 件商品
        <a  href="" class="btn btn-success no-print" onclick="window.print();return false;" ><i class="glyphicon glyphicon-print"></i> 打印</a>
        <a  href="#" class="btn btn-info"  ><i class="glyphicon glyphicon-eye-open"></i> 继续购物</a>
	</div>
</div>



<div class="row">
	<div class="col-md-12">
		 <table class="table table-hover">
        <thead>
          <tr>
            <th>编号</th>
            <th>商品名</th>
            <th>数量</th>
            <th>价格</th>
            <th>总价</th>
            <th>删除</th>
          </tr>
        </thead>
        <tbody ng-repeat="item in cart | filter:cartFilter">
          <tr>
            <td>{{item.code}}</td>
            <td>{{item.name}}</td>
            <td>{{item.quantity}}</td>
            <td>{{item.price | currency}}</td>
            <td>{{item.price * item.quantity | currency}}</td>
            <td class="box-pointor  text-center" ng-click="removeItem(item);"><i class="glyphicon glyphicon-remove-circle"></i></td>
          </tr>
        </tbody>
				<tbody class="cart-item-total">
        	<tr>
        		<td></td>
        		<td>总计</td>
        		<td>{{itemsOnCart}}</td>
        		<td>{{getSubTotal() | currency}}</td>
        		<td>{{getGrandTotal() | currency}}</td>
        		<td></td>
        	</tr>
        </tbody>        
      </table>
	</div>
</div>


<div class="row">
	<div class="col-md-12">
		<span class="pull-right" ng-show="itemsOnCart" >
			<a  href="" data-target="#myCheckout" role="button" class="btn btn-success no-print" data-toggle="modal"><i class="glyphicon glyphicon-ok"></i> 去结算</a>
		</span>
	</div>
</div>

<!-- Modal -->
<div class="modal fade" id="myCheckout" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">付款 ?</h4>
      </div>
      <div class="modal-body">
        <p>你真的一定要继续 ? </p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>        
        <button type="button" class="btn btn-primary" ng-click="proceedToCheckout()"  data-dismiss="modal">支付</button>
      </div>
    </div>
  </div>
</div>


